<?php
# file will contain functions to create home page

# main function to create main window for home page
function i_main_page(){
	$html = ''; // variable to store html code for home page
	
#	$html .= '<div class="rightColumn">';
	$html .= 	'<div class ="wrapper" >';
 	$html .=		'<h1 style="margin-left:230px;">Welcome to Meet n\' Go!</h1>';
#	$html .= 	'</div>';
    $html .= 	'<div class="mainPage">';
	$html .= 		'<p><img src="images/business-woman-table-group_full.jpeg"  width="500" height="300" style="margin-left:260px; /></p> ';
	$html .= 		'<p align="center">&nbsp;</p>';
	
	# display error messages
	if(has_errors()){
		$err = i_get_msg_err();
		$ci = count($err);
		for($i=0; $i<$ci; $i++){
			$html .= '<div id="error_msg">' . $err[$i] . '</div>';
		}
	}
	# display info messages
	if(has_inf_msg()){
		$inf = i_get_msg_inf();
		$ci = count($inf);
		for($i=0; $i<$ci; $i++){
			$html .= '<div id="msg_inf">' . $inf[$i] . '</div>';
		}
	}
	
	$html .= 		'<form id="form1" name="form1" method="post" action="php/core/main_page/p_login.php" style="margin-left:350px;">'; // changed action to appropriate one
#	$html .= 			'<div align="center">';
    $html .= 				'<table width="262" height="80" border=" ">'.
								'<tr>' .
									'<td width="85" scope="col"><div align="left">Email:</div></td>' .
									'<th width="167" scope="col"><div align="left">'.
										'<input type="text" name="email" id="username_filed" />'.
									'</div></th>'.
								'</tr>'.
								'<tr>'.
									'<td>Password:</td>'.
									'<td><input type="password" name="password" id="password_field" /></td>'. // type password
								'</tr>'.
							'</table>';
    $html .= 				'<input type="submit" value="Login" style="width:70px; margin-left:100px;"/>';
		$html .= 		'<p align="center">&nbsp;</p>';
	$html .= 		'<p style="margin-left:70px;"><a href="index.php?id=2">New user - register</a></p>';
	$html .= 			'</div>';
	$html .= 		'</form>';
	
	$html .= 	'</div>';
	$html .= '</div>';
	
	
	return $html;
}
?>
	
				
